package br.com.portadelivery.app.views;

import java.util.ArrayList;

import br.com.portadelivery.app.interfaces.IServer;
import br.com.portadelivery.app.model.Usuario;
import br.com.portadelivery.app.server.UsuarioAdapter;
import br.com.portadelivery.app.server.UsuarioServer;
import android.os.Bundle;


public class ListarUsuariosActivity extends BaseListActivity {

	private IServer server = new UsuarioServer();
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
	}

	@Override
	public void DoLoad(String tag) {
		// TODO Auto-generated method stub
		super.DoLoad("ListarUsuariosActivity");
		try {
			ArrayList<Usuario> userlist = new ArrayList<Usuario>();
			userlist = server.buscartodos();
			setListAdapter(new UsuarioAdapter(this, userlist));

		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
}
